<?php
namespace app\dboard\logic;
use think\Db;
use services\OpensslService;
use think\facade\Session;
class Base{
    public $res_data=['Code'=>1,'Msg'=>'','ErrorSql'=>'','Data'=>[]];

    public function __construct()
    {
        if (!Session::has('AccountInfo')) {
            $this->redirect('/dashboard/login/login');
        }
        $this->AccountInfo['AccountId']=Session::get('AccountInfo.id');
        $this->AccountInfo['AccountName']=Session::get('AccountInfo.user_name');
        $this->AccountInfo['AccountTel']=Session::get('AccountInfo.tel');
    }

    public function printResult($res_data){
        if(!is_array($res_data)){
            $res_data['Msg']='输出信息不符合规范';
        }
        return $this->res_data;
    }

}
